﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;

namespace KingdeePdaService
{
    internal  class ConfigDatas
    {
        public static string K3ServerUrl
        {
            get;
            private set;
        }


        public static void  Initial()
        {
              K3ServerUrl = "http://61.131.60.254:1080/K3Cloud/";
            KingdeeAccounts = new System.Data.DataSet();
            DataTable tabl = new DataTable();
            tabl.Columns.Add(new DataColumn("accountText", typeof(string)));
            tabl.Columns.Add(new DataColumn("accountId", typeof(string)));

            // select FDATACENTERID,FNAME from T_BAS_DATACENTER_L where FLOCALEID='2052'
            string[] acs = ConfigurationManager.AppSettings.Get("DataCenters").Split(';');
            string[] ac;
            foreach (string s in acs) {

                ac = s.Split(',');
             
                DataRow row = tabl.NewRow();
                row["accountId"] = ac[0].Trim();
                row["accountText"] = ac[1].Trim();
                tabl.Rows.Add(row);
            }
            KingdeeAccounts.Tables.Add(tabl);


        }


        public static System.Data.DataSet KingdeeAccounts;
       

        

    }
}